/*
 * Copyright (c) 2008-2013 Haulmont. All rights reserved.
 * Use is subject to license terms, see http://www.cuba-platform.com/license for details.
 */

package com.haulmont.asu.entity;

import javax.persistence.*;
import java.math.BigDecimal;

/**
 * Author: Sergey42
 * Date: 14.10.13 12:18
 */
@Table(name = "EXT_STUDENT")
@Entity(name = "ext$Student")
@DiscriminatorValue("S")
@PrimaryKeyJoinColumn(name = "PERSON_ID", referencedColumnName = "ID")
public class Student extends Person {

    private static final long serialVersionUID = -1517404266669229942L;

    @Column(name = "BOOK_NUMBER", length = 10)
    protected String bookNumber;

    @ManyToOne
    @JoinColumn(name = "STUDENT_GROUP_ID")
    protected StudentGroup studentGroup;

    @Column(name = "ACTIVE")
    protected Boolean active = Boolean.FALSE;

    @Column(name = "GPA")
    protected BigDecimal gpa;

    public String getBookNumber() {
        return bookNumber;
    }

    public void setBookNumber(String bookNumber) {
        this.bookNumber = bookNumber;
    }

    public StudentGroup getStudentGroup() {
        return studentGroup;
    }

    public void setStudentGroup(StudentGroup studentGroup) {
        this.studentGroup = studentGroup;
    }

    public Boolean getActive() {
        return active;
    }

    public void setActive(Boolean active) {
        this.active = active;
    }

    public BigDecimal getGpa() {
        return gpa;
    }

    public void setGpa(BigDecimal gpa) {
        this.gpa = gpa;
    }
}
